//
//  JSTPickerView.h
//  KYKJPackDemo
//
//  Created by 01 on 17/6/20.
//  Copyright © 2017年 ???. All rights reserved.
//

#import <UIKit/UIKit.h>
@class JSTPickerView;

@protocol JSTPickViewDelegate <NSObject>

@optional

/*  indexPath:业务层选中的indexPath.section或indexPath.row  */
- (void)confirmBtnHaveClick:(JSTPickerView *)pickView resultString:(NSString *)resultString indexPath:(NSIndexPath *)indexPath;

/*  selectedRow:ANGPickerView选中行  */
- (void)confirmBtnHaveClick:(JSTPickerView *)pickView resultString:(NSString *)resultString selectedRow:(NSInteger)selectedRow;

@end

@interface JSTPickerView : UIControl<UIPickerViewDataSource,UIPickerViewDelegate>

@property(nonatomic,weak) id <JSTPickViewDelegate> delegate;

@property (nonatomic, strong) NSString          *resultStr;     //返回string

@property (nonatomic, strong) NSIndexPath       *indexPath;     // 选择哪个section

@property (nonatomic, assign) NSInteger         selectedRow;     // 选中行数

@property (nonatomic, strong) NSString          *currentYearString;

@property (nonatomic, strong) NSString          *currentMonthString;

@property (nonatomic, strong) NSString          *currentDayString;

@property (nonatomic, strong) NSMutableArray    *logisticsArr;

@property (nonatomic, copy) NSString            *yearStr;

- (id)initWithFrame:(CGRect)frame string:(NSString *)string getType:(PickerViewType)type;

- (id)initWithFrame:(CGRect)frame items:(NSArray *)items getType:(PickerViewType)type;

- (void)showOnWindow;

- (void)dismissView;

@end
